
***************************************************************************************************************************
************* Replication Materials for                                                                   ******************
************* Bucchianeri, Volden, and Wiseman (2023) "Legislative Effectiveness in the American States"  ******************
***************************************************************************************************************************


This directory includes the data and coded needed to replicate all tables and figures included in "Legislative Effectiveness in the American States"

******************
****   Data   ****
******************

1. 49 State Files in the 'Data/bills_by_state' directory -- 1 CSV file per state, with 1 row per introduced bill. Each record contains information about the individual who sponsored the bill, how far it progressed in the lawmaking process, it's relative significance, and whether it ultimately became law. Most states also include information about the bill itself (it's title, in some cases keywords) and a link to the actual bill page on the state's legislative website. 

2. covariates_all_legislators.csv -- CSV file with 1 row per legislator x legislative term. Includes information about the legislator (party, chamber, institutional positions, electoral information, demographic information, etc.) and the chamber (size, rules, and resources).

3. covariates_all_states.csv -- CSV file with 1 row per state x chamber x legislative term. Includes information about the state-chamber (party control, ideological median, rules and institutional characteristics, and more).

4. SLES_individual_level.csv -- CSV file with 1 row per legislator x legislative term. Output file of the '0_estimate_SLES.R' script. Includes all information in the 'covariates_all_legislators.csv' file needed for the analysis along with their state legislative effectiveness score (SLES) and the five individual components that it is created from. 

5. SLES_state_level.csv -- CSV file with 1 row per state x chamber x legislative term. Output file of the '0_estimate_SLES.R' script. Includes all information in the 'covariates_all_states.csv' file needed for the analysis along with aggregate information about the SLES distribution in that state-chamber for each term (e.g., difference in effectiveness between the majority and minority party, between chairs and rank and file legislators, between new and more senior members).

6. Edwards_2018_NC_legislators.dta -- Data compiled by Edwards (2018) for legislators in North Carolina. Used primarily for the NCCPPR scores that are included within it.  


******************
****  Scripts  ****
******************

0. [OPTIONAL] '0_estimate_SLES.R' -- This script takes in the pre-processed bill-level data, aggregates it, and computes our State Legislative Effectiveness Scores (SLES). The two output files (SLES_individual_level.csv and SLES_state_level.csv) are then used as inputs for the rest of the analysis. Note that this file is "optional" in that we have included the output files in the replication file already, so it does not need to be run to replicate the figures and tables in the paper. 

1. '1_SLES_analysis_main.R' -- This is the main analysis file. It recreates all of the tables and figures in the main text, with the exception of those that use the NCCPPR data (Figure 1, Table A4). 

2. '2_SLES_analysis_nccppr.R' -- This file cleans the NCCPPR data provided by Edwards (2018), joins it to our SLES data, and uses the combined file to create Figure 1 and Table A4.

3. '3_SLES_analysis_appendix.R' -- This file includes code to recreate all tables and figures in the paper's appendix, excluding Table A4. 

4. 'bill_stage_coding_regex.R' -- This file is included to provide information on the precise terms and logic used to code individual bills by stages of the legislative process.

